<div class="mat-elevation-z8">
  <table mat-table class="full-width-table" [dataSource]="dataSource" matSort aria-label="Elements">
    <!-- Id Column -->
    <ng-container matColumnDef="key">
      <th mat-header-cell *matHeaderCellDef mat-sort-header>Key</th>
      <td mat-cell *matCellDef="let row">{{row.key}}</td>
    </ng-container>
    <!-- Name Column -->
    <ng-container matColumnDef="owner">
      <th mat-header-cell *matHeaderCellDef mat-sort-header>Owner</th>
      <td mat-cell *matCellDef="let row">{{row.owner}}</td>
    </ng-container>

    <!-- Name Column -->
    <ng-container matColumnDef="make">
      <th mat-header-cell *matHeaderCellDef mat-sort-header>Make</th>
      <td mat-cell *matCellDef="let row">{{row.make}}</td>
    </ng-container>

    <!-- Name Column -->
    <ng-container matColumnDef="model">
      <th mat-header-cell *matHeaderCellDef mat-sort-header>Model</th>
      <td mat-cell *matCellDef="let row">{{row.model}}</td>
    </ng-container>

    <!-- Name Column -->
    <ng-container matColumnDef="colour">
      <th mat-header-cell *matHeaderCellDef mat-sort-header>Colour</th>
      <td mat-cell *matCellDef="let row">{{row.colour}}</td>
    </ng-container>

    <ng-container matColumnDef="actions">
      <th mat-header-cell *matHeaderCellDef mat-sort-header>actions</th>
      <td mat-cell *matCellDef="let row">
        <button color="primary" (click)="editCar(row)" mat-icon-button>
          <mat-icon >edit</mat-icon>
        </button>
      </td>
    </ng-container>

    <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
    <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
  </table>

  <mat-paginator #paginator [length]="dataSource.data.length" [pageIndex]="0" [pageSize]="50" [pageSizeOptions]="[25, 50, 100, 250]">
  </mat-paginator>
</div>